/*
 * WSMessage is implements the WebSocket function of server side.
 * @version 1.0.0 01/28/2012
 * @author Yanqing Liu
 *
 */

package edu.baylor.websocket;

/**
 * WSMessage implements IWSMessage interface
 * @version 1.0.0 01/28/2012
 * @author Yanqing Liu
 */
public class WSMessage implements IWSMessage {

    WSMessageType type;
    byte[] payload;
    
    @Override
    public byte[] getData() {
        return payload;
    }

    @Override
    public void setData(byte[] d) {
        payload = d;
    }

    @Override
    public WSMessageType getMessageType() {
        return type;
    }

    @Override
    public void setMessageType(WSMessageType type) {
        this.type = type;
    
    }

}
